package com.xdw.addressbookbyjava.model;

public class ApiResult<T> {
    public static final int SUCCESS = 1;
    public static final int ERROR = -1;

    /**
     * 状态码 1: success, -1: error
     */
    private int code;

    /**
     * 提示消息
     */
    private String msg;

    /**
     * 结果数据
     */
    private T data;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
